import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import Login from "@/pages/Login.vue";
import { createRouter,createWebHistory} from 'vue-router'

import store from "@/store.js";
import Register from "@/pages/Register.vue";
import Files from "@/pages/Files.vue";
import Access from "@/pages/Access.vue";
import EditAccess from "@/pages/EditAccess.vue";
import Rename from "@/pages/Rename.vue";
import Upload from "@/pages/Upload.vue";

const routes = [
    {path: '/login', component: Login, name: "login"},
    {path: '/registration', component: Register, name: "register"},
    {path: '/', component: Files, name: "files"},
    {path: '/shared', component: Access, name: "access"},
    {path: '/access/:id', component: EditAccess, name: "edit_access", props: true},
    {path: '/rename/:id', component: Rename, name: "rename", props: true},
    {path: '/upload', component: Upload, name: "upload",},

]

const router = createRouter({
    history: createWebHistory(),
    routes: routes,
})

const app = createApp(App)

app.provide(store)
app.use(router)
app.mount('#app')
